Strength Reduction of Integer Division and Modulo Operations

نویسندگان

  • Jeffrey Sheldon
  • Walter Lee
  • Ben Greenwald
  • Saman P. Amarasinghe
چکیده

Integer division, modulo, and remainder operations are expressive and useful operations. They are logical candidates to express many complex data accesses such as the wrap-around behavior in queues using ring buffers and array address calculations in data distribution and cache locality compiler-optimizations. Experienced application programmers, however, avoid them because they are slow. Furthermore, while advances in both hardware and software have improved the performance of many parts of a program, few are applicable to division and modulo operations. This trend makes these operations increasingly detrimental to program performance. This paper describes a suite of optimizations for eliminating division, modulo, and remainder operations from programs. These techniques are analagous to strength reduction techiques used for multiplications. In addition to some algebraic simplifications, we present a set of optimization techniques which eliminates division and modulo operations that are functions of loop induction variables and loop constants. The optimizations rely on number theory, integer programming and loop transformations.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Eecient Address Translation

The address calculation for distributed data access plays a major role for the performance of ne-grained data-parallel applications. This paper reports about the hardware centrifuge of the Cray T3E which enables the shift of the address calculation from software into hardware. This shift minimizes address calculation overhead reducing communication cost of dynamic communication patterns. The ce...

متن کامل

Additive bit-serial algorithm for discrete logarithm modulo 2/sup k/ - Electronics Letters

Introduction and summary: Hardware capabilities for integer arithmetic generally include addition, multiplication, and division with precision k typically chosen as 16, 32 or 64. Multiplication and division are often implemented by recursive bit serial algorithms employing O(k) serial additions to avoid the size and power requirements of a large multiplier. The integer addition and multiplicati...

متن کامل

Addition-based exponentiation modulo 2/sup k/ - Electronics Letters

Introduction and background: The basic integer arithmetic operations of addition=subtraction, multiplication and division are implemented typically in hardware using k bits of precision with k usually 16, 32, or 64, and up to 1024 in the case of cryptography. Having a precision limited to k bits makes the arithmetic operations equivalent to their corresponding residue arithmetic modulo 2 operat...

متن کامل

Uniform Circuits for Division: Consequences and Problems

Integer division has been known to lie in P-uniform TC since the mid1980’s, and recently this was improved to L-uniform TC. At the time that the results in this paper were proved and submitted for conference presentation, it was unknown whether division lay in DLOGTIME-uniform TC (also known as FOM). We obtain tight bounds on the uniformity required for division, by showing that division is com...

متن کامل

ILP Modulo Theories

We present Integer Linear Programming (ILP) Modulo Theories (IMT). An IMT instance is an Integer Linear Programming instance, where some symbols have interpretations in background theories. In previous work, the IMT approach has been applied to industrial synthesis and design problems with real-time constraints arising in the development of the Boeing 787. Many other problems ranging from opera...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001